#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

/**
  * @方法: 
  * @时间复杂度: o(n logn logm)
  * @空间复杂度: o(n)
  * @评价: 代码简单，证明复杂
*/
string largestNumber(vector<int>& nums) {
    vector<string> strs;
    for(int num:nums){
        strs.push_back(to_string(num));
    }
    sort(strs.begin(), strs.end(), [](string x, string y){
        return y + x > x + y;
    });
    string ans = "";
    for(string str : strs){
        ans += str;
    }
    if(ans[0] == '0' && ans.length() > 1) return "0";
    return ans;
}


int main(){
    cout << "hello world" << endl;
    return 0;
}